﻿@{
    ViewBag.Title = "Index";
}
<script src="~/Scripts/jquery-1.7.2.js"></script>
<script src="~/Scripts/uploadPreview.min.js"></script>
<h2>Index</h2>
@using (Html.BeginForm("FileUp", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    <input id="file1" name="file1" type="file"/>
    <img id="pic1" alt="" />
    <input id="file2" type="file" name="file2" />
    <img id="pic2" alt="" />
    <input id="file3" type="file" name="file3" />
    <img id="pic3" alt="" />
    <input id="file4" type="file" name="file4" />
    <img id="pic4" alt="" />
    <input type="submit" value="上传" />
}

<script type="text/javascript">
    $(function () {
        $("#file1").uploadPreview({ Img: "pic1", Width: 120, Height: 120 });
        $("#file2").uploadPreview({ Img: "pic2", Width: 120, Height: 120 });
        $("#file3").uploadPreview({ Img: "pic3", Width: 120, Height: 120 });
        $("#file4").uploadPreview({ Img: "pic4", Width: 120, Height: 120 });
    });
</script>